Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Angular 15 #36

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Upgrade to Angular 15 #36

wants to merge 6 commits into from

Conversation

Sinetheta
Copy link
Owner

TODO update docker images

Again, everything seems to be working...

Some more extenssive testing on staging will be in order. I want to check captcha. Not sure off hand if the node upgra

Update angular 14 to 15
Update node 14.18 to 18.17
Update npm 6.14 to 10.1
Update primeng 13 to 15
Update ng-recaptcha 9 to 11
Remove ngx-google-analytics

@Sinetheta Sinetheta force-pushed the angular-15 branch 2 times, most recently from 088306d to a6bf947 Compare November 12, 2023 19:54
This appears to be a clean upgrade. I had to upgrade TSC as well,
but nothing seems broken and the changelog looks promissing.

https://angular.io/guide/update-to-version-14
Update node 14.18 to 18.17
Update npm 6.14 to 10.1
Update primeng 13 to 15
Update ng-recaptcha 9 to 11
Remove ngx-google-analytics
It appears as though some things that were skating through tsc
are no longer ignorable. This types some model methods and request
handlers more strictly but makes no functional changes.
There's a new syntax for finding the test files and starting up.

https://stackoverflow.com/a/74886791/848249
Due to an optimistic type change earlier in the upgrade it was
possible here to send through an empty string which angers Mongo.
Since we've typed the var strictly to a string we can check here
for an empty string explicitly.
The frontend was already on 18 but the backend was separately
using 14. This update involved only meaningful changes in the
Dockerfile.
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR upgrades the application to Angular 15 and updates associated dependencies such as Node, npm, primeng, and ng-recaptcha while removing the ngx‑google‑analytics integration.

  • Improved type annotations and code style consistency in API controllers
  • Updated dependency versions and CI workflow configurations
  • Adjusted the testing setup to align with changes in Angular 15

Reviewed Changes

File Description
app/api/blueprint-controller.ts Code style updates and enhanced type definitions for request objects
frontend/src/test.ts Updates to the Angular testing setup
app/api/duplicate-check-controller.ts Improved callback typings for Mongoose
app/api/login-controller.ts Enhanced type annotations in the authentication callback
.github/workflows/frontend_install/action.yml Updated Node.js version for the frontend installation workflow
app/api/models/user.ts Refined UserModel schema and crypto usage
frontend/src/app/app.module.ts Removal of ngx‑google‑analytics module
app/api/auth.ts Updated callback error typing and import adjustments

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

frontend/src/test.ts:8

  • [nitpick] The removal of the test module loader code (using require.context) suggests a change in the test discovery mechanism. Please confirm that all test files are still being discovered and executed under the new Angular testing setup.
// Then we find all the tests.\n// And load the modules.

Comment on lines +313 to 314
private static handleGetBlueprint(req = {}, res: Response, userId: string, blueprints: Blueprint[]) {

Copy link
Preview

Copilot AI Mar 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default parameter value for 'req' is set to an empty object, which may not satisfy the expected properties of a Request. Consider explicitly typing 'req' as Request and removing the default value to prevent potential runtime errors.

Suggested change
private static handleGetBlueprint(req = {}, res: Response, userId: string, blueprints: Blueprint[]) {
private static handleGetBlueprint(req: Request, res: Response, userId: string, blueprints: Blueprint[]) {

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant